/**
 * 发送信息，分享，复制等操作
 */
var sendMsgTool = function (content, receivers, type) {
    var msg = plus.messaging.createMessage(type ? type : plus.messaging.TYPE_SMS);
    msg.to = receivers ? receivers : [''];
    msg.body = content;
    plus.messaging.sendMessage(msg);
}


var copyText = function(content) {
    if (plus.os.name == "iOS") {
        var UIPasteboard = plus.ios.importClass("UIPasteboard");
        var generalPasteboard = UIPasteboard.generalPasteboard();
        // 设置文本内容:
        generalPasteboard.setValueforPasteboardType(content, "public.plain-text");
        var value = generalPasteboard.valueForPasteboardType("public.plain-text");
    } else {
        var Context = plus.android.importClass("android.content.Context");
        var main = plus.android.runtimeMainActivity();
        var clip = main.getSystemService(Context.CLIPBOARD_SERVICE);
        plus.android.invoke(clip, "setText", content);
    }
}
